﻿@model Coding4Fun.Lockscreen.Web.Models.Category

@{
    ViewBag.Title = "AddCategory";
}

<head>
    <title>Coding4Fun Dynamic Lockscreen</title>

    <link rel="stylesheet" href="~/Scripts/UITheme/jquery-ui-1.9.2.custom.css" type="text/css" />

    <script type="text/javascript" src="~/Scripts/jquery-1.8.3.js"></script>
    <script type="text/javascript" src="~/Scripts/jquery-ui-1.9.2.custom.js"></script>
    <script type="text/javascript" src="~/Scripts/jshelper.js"></script>

    <script type="text/javascript" id="js">
        $(document).ready(function () {
            setButtonStyles();
        });

        function mainViewClick() {
            var url = '@Url.Action("MainView", "Home")';
                    window.location = url;
                };
    </script>
</head>

<a href="@Url.Action("MainView", "Home")">
    <img src="~/Images/logo.png" style="border: 0; margin-bottom: 20px;" />
</a>
<br />

@using (Html.BeginForm())
{
    @Html.ValidationSummary(true)

    <div class="editor-label">
        @Html.LabelFor(model => model.Name)
    </div>

    <div class="editor-field">
        @Html.EditorFor(model => model.Name)
    </div>
    
    @Html.ValidationMessageFor(model => model.Name)
    <br />
    
    <p>
        <input class="btnAdd" style="width: 130px; height: 30px; font-size: 80%;" type="submit" value="Create" />
    </p>
}

<button style="width: 130px; height: 30px; font-size: 80%" class="btnBack" onclick="mainViewClick()">To Categories</button>